import fetch from 'common/src/utils/fetch';
// 添加
export function addLimitStudent (data) {
    return fetch({
        url: '/api/majorservice/limitStudent/insert',
        method: 'post',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    });
}
// 批量修改
export function updateBatch (data) {
    return fetch({
        url: '/api/majorservice/limitStudent/updateBatch',
        method: 'put',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    });
}
// 修改
export function updateLimitStudent (data) {
    return fetch({
        url: '/api/majorservice/limitStudent/update',
        method: 'put',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    });
}
// 软删除
export function deleteLimitStudent (data) {
    return fetch({
        url: '/api/majorservice/limitStudent/delete',
        method: 'delete',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    });
}
// 联动学号查询学生信息
export function getStuInfoByCode (data) {
    if (data == null) {
        return;
    }
    return fetch({
        url: '/api/studentservice/studentInfo/findStuInfoList/',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}
// 联动根据年级查询大类
export function getMajorByGrade (data) {
    if (data == null) {
        return;
    }
    return fetch({
        url: '/api/welcomeservice/tutorSchool/major/' + data,
        method: 'get',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}
// 联动根据年级大类查询专业
export function getSubjectByGradeAndMajor (gradeId, majorCode) {
    return fetch({
        url: '/api/commonservice/campusProfession/findProfessionByBigProfession?grade=' + gradeId + '&bigProfessionCode=' + majorCode,
        method: 'get',
        headers: { 'Content-Type': 'application/json' },
    });
}
// 根据年级查询专业学院
export function getSchoolByGrade (data) {
    return fetch({
        url: '/api/welcomeservice/tutorSchool/list',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}
// 根据年级，专业大类code查询专业大类名称
export function getMajorNameByCode (gradeId, majorCode) {
    return fetch({
        url: '/api/majorservice/limitStudent/transMajorCode?gradeId=' + gradeId + '&majorCode=' + majorCode,
        method: 'get',
        headers: { 'Content-Type': 'application/json' },
    });
}
